<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>富文本编辑器</title>
    <link rel="stylesheet" href="../plugins/layui/src/css/layui.css">
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <script src="../js/vue.js"></script>
    <script src="../js/axios-0.18.0.js"></script>
    <style>

    </style>
</head>
<body>
<div id="app1" style="height: auto;">
    <template>
        <el-table :data="tableData" style="width: 80%">
            <el-table-column prop="name" label="姓名" width="180"></el-table-column>
            <el-table-column prop="username" label="用户名"></el-table-column>
            <el-table-column prop="phone" label="手机号"></el-table-column>
            <el-table-column prop="sex" label="性别">
                <template slot-scope="scope">{{ scope.row.sex === 0 ? '男' : '女' }}</template>
            </el-table-column>

            <span v-if="">

            </span>
            { title: "是否发布", dataIndex: "publish", width: 100 }

            <el-table-column prop="country" label="国家"></el-table-column>
        </el-table>
    </template>
</div>
<script src="../plugins/layui/src/layui.js"></script>
<script src="../plugins/elementui/index.js"></script>
<script>
    var vue = new Vue({
        el: '#app1',
        data: {
            tableData: [{
                date: '2016-05-02',
                name: '王小虎',
                username: '王小虎',
                phone: '123',
                sex: '男',
                country: '上海市普陀区金沙江路 1518'
            }]
        },
        created() {
            this.getUserInfoAll();
        },
        methods:{
            getUserInfoAll() {
                axios.post("/user/login/getUserInfoAll").then((response) => {
                    if (response.data.flag) {
                        this.tableData = response.data.data;
                    }
                });
            }
        }
    })
</script>
</body>
</html>